var personModule = require('./person.js');
class Teacher extends personModule.Person{
    constructor(id , name , age , klass){
        super(id , name , age);
        this.klass = klass;
    }
    introduce(){
        var classString = (this.klass == null) ? 'No Class' : ('Class ' + this.klass.toString()) ;
        var string = super.introduce() + ' I am a Teacher. I teach ' + classString +'.';
        return string;
    }
    introduceWith(student){
        var ifTeach = (this.klass == student.klassObj.number) ? '' : 'don\'t ';
        var string = super.introduce() + ' I am a Teacher. I ' + ifTeach + 'teach ' + student.name + '.';
        return string;
    }
}

module.exports.Teacher = Teacher;